<template>
  <div class="item">
    <div class="details">
      <h1>
        <slot name="heading"></slot>
      </h1>
      <h2>
        <slot name="subheading"></slot>
      </h2>
      <div class="buttons">
        <button class="enter-button" @click="openSystem()">
          <slot name="enter-button-text"></slot>
        </button>
        <button class="introduce-button" @click="openReadme()">
          <slot name="introduce-button-text"></slot>
        </button>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: 'WelcomeItem',
  methods: {
    openSystem() {
      window.location.href = '/analysis';
    },
    openReadme() {
      window.location.href = '/readme';
    },
  },
}
</script>

<style scoped>
.item {
  margin-top: 2rem;
  height: 45rem;
  display: flex;
  position: relative;
}

.details {
  flex: 1;
  margin-left: 1rem;
}

h1 {
  font-size: 3rem;
    font-weight: 500;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 10rem;
    color: var(--vt-c-blue-dark);
}

h2 {
  font-size: 2.5rem;
  font-weight: 500;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 1rem;
  color: var(--color-heading);
}

.buttons {
  display: flex;
  
  margin-top: 2rem;
  justify-content: center;
  align-items: center;
}

button {
  float: left;
  margin-left: 1rem;
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--color-text);
  background-color: var(--vt-c-gray-mute);
  border: none;
  border-radius: 5rem;
  padding: 2rem 5rem;
  cursor: pointer;
}

button:hover {
  background-color: var(--vt-c-gray);
}

.enter-button {
  background-color: var(--vt-c-blue-light);
}

.enter-button:hover {
  background-color: var(--vt-c-blue-mute);
}

</style>
